<% include ../header.ejs %>

<link rel="stylesheet" href="/stylesheets/app/schedule/schedule_index.css" />

<link rel="stylesheet" href="/lib/datetimepicker/css/amazeui.datetimepicker.css"/>
<script src="/lib/datetimepicker/js/amazeui.datetimepicker.min.js"></script>
<script src="/lib/datetimepicker/js/locales/amazeui.datetimepicker.zh-CN.js"></script>

<link href='/lib/weekview/fullcalendar.min.css' rel='stylesheet' />
<script src='/lib/weekview/lib/moment.min.js'></script>
<script src='/lib/weekview/fullcalendar.min.js'></script>
<script src='/lib/weekview/locale/zh-cn.js'></script>
<style>
    #day .datetimepicker-inline{
        margin-top: 0;
    }

    .fc-toolbar.fc-header-toolbar {
        background: #3bb4f2;
        color: #fff;
        margin-bottom: 0em;
    }

    .fc-next-button{
        background: #3bb4f2;

    }
    .fc-state-default {
        background: #3bb4f2;
        border-color: #3bb4f2;
        color: #ffffff;
        text-shadow: 0 0px 0px rgba(255, 255, 255, 0);
        box-shadow: inset 0 0px 0 rgba(255, 255, 255, 0), 0 0px 0px rgba(0, 0, 0, 0);
    }
    .fc-view-container *{
        font-weight: 400;
        font-size: 16px;
    }
    .fc-content {
        text-align: center;
    }
    .am-g .am-g {
        margin-left: 0em;
        margin-right: 0em;
    }
    .am-panel>.am-list>li>a {
        padding-left: 0;
        padding-right: 0;
    }
</style>
<header data-am-widget="header" data-am-sticky class="am-header am-header-default" id="appTemplates-Nav">
    <div class="am-header-left am-header-nav">
        <a href='/smtool_project/wxapp' class="">
            <img class="am-header-icon-custom" src="data:image/svg+xml;charset&#x3D;utf-8,&lt;svg xmlns&#x3D;&quot;http://www.w3.org/2000/svg&quot; viewBox&#x3D;&quot;0 0 12 20&quot;&gt;&lt;path d&#x3D;&quot;M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z&quot; fill&#x3D;&quot;%23fff&quot;/&gt;&lt;/svg&gt;" alt=""/>
        </a>
    </div>

    <h1 class="am-header-title">
        <a href="#title-link" class="" id="Typeface-whitecolor">工作日程</a>
    </h1>

    <div class="am-header-right am-header-nav">

             <a href="/smtool_project/wxapp/globalschedule/index?page=schedule" class="">
                      <i class="am-header-icon am-icon-user" ></i>
                    </a>
        <a href="#" class="" data-am-modal="{target: '#modal-type-add', closeViaDimmer: 0, width: 240}">
            <i class="am-header-icon am-icon-plus"></i>
        </a>
    </div>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
</header>

<div ng-app="scheduleList" ng-controller="listController">
    <div class="am-modal am-modal-no-btn" tabindex="-1" id="modal-type-add">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">选择新建类型
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd">
                <a href="roadshow/add"><button class="am-btn am-btn-primary" style="width:80%;margin:15px auto;">路演</button></a>
                <a href="survey/add"><button class="am-btn am-btn-primary" style="width:80%;margin:15px auto;">调研</button></a>
                <a href="strategy/add"><button class="am-btn am-btn-primary" style="width:80%;margin:15px auto;">策略会</button></a>
                <a href="teleconference/add"><button class="am-btn am-btn-primary" style="width:80%;margin:15px auto;">电话会议</button></a>
                <a href="workdiary/page?pageType=add"><button class="am-btn am-btn-primary" style="width:80%;margin:15px auto;">其他</button></a>
            </div>
        </div>
    </div>

    <div class="am-g">
        <!-- <div id="day" class="am-input-group am-datepicker-date" data-am-datepicker="{format: 'yyyy-mm-dd'}">
            <input id="selectday" type="text" class="am-form-field" placeholder="选择日期" readonly>
            <span class="am-input-group-btn am-datepicker-add-on">
                <button class="am-btn am-btn-default" type="button"><span class="am-icon-calendar"></span> </button>
            </span>
        </div> -->
        <!--<div id="day"/>-->
        <div id="calendar"/>
    </div>

    <ul class="am-list admin-sidebar-list" id="collapase-nav-1" style="margin-top: 0">
        <li class="am-panel">
            <a data-am-collapse="{target: '#roadshow-nav'}" style="background-color:#eee">
                &nbsp;路演 <i class="am-fr am-margin-right"> {{listData.roadshowResult.length}} </i>
            </a>
            <ul class="am-list am-collapse admin-sidebar-sub am-in" id="roadshow-nav">
                <li class="am-g am-list-item-desced" style="padding: 0px;" ng-repeat="data in listData.roadshowResult">
                    <a class="am-list-main" href="roadshow/detail?rowId={{data.rowId}}">
                        <div class="am-g">
                            <div class="am-u-sm-9">
                                <h5 class="am-list-item-hd" style="margin-bottom: 2px"><span class="am-icon-star" style="color: #dd514c;" ng-if="data.userjoin"></span> {{data.seller.name}}</h5>
                            </div>
                            <div class="am-u-sm-3" style="text-align:right;">
                                <span class="am-badge am-badge-success am-radius am-text-sm">{{data.industry.industryName}}</span>
                            </div>
                        </div>
                        <div class="am-g">
                            <div class="am-u-sm-12">
                                <h6 class="am-list-item-text">{{data.content}}</h6>
                            </div>
                        </div>
                        <div class="am-g">
                            <div class="am-u-sm-3">
                                <h6 class="am-list-item-text" style="color: #9b9b9b;">{{data.createUid.name}}</h6>
                            </div>
                            <div class="am-u-sm-9" style="text-align:right;">
                                <h6 class="am-list-item-text" style="color: #9b9b9b;">{{data.address.name}}&nbsp;{{formatDate(data.startTime, 'MM/dd hh:mm')}} - {{formatDate(data.finishTime, 'MM/dd hh:mm')}}</h6>
                            </div>
                        </div>
                    </a>
                </li>
            </ul>
        </li>

        <li class="am-panel">
            <a data-am-collapse="{target: '#serveying-nav'}" style="background-color:#eee">
                &nbsp;调研 <i class="am-fr am-margin-right"> {{listData.serveyingResult.length}} </i>
            </a>
            <ul class="am-list am-collapse admin-sidebar-sub am-in" id="serveying-nav">
                <li class="am-g am-list-item-desced" style="padding: 0px;" ng-repeat="data in listData.serveyingResult">
                    <a class="am-list-main" href="survey/detail?rowId={{data.rowId}}">
                        <div class="am-g">
                            <div class="am-u-sm-9">
                                <h5 class="am-list-item-hd" style="margin-bottom: 2px"><span class="am-icon-star" style="color: #dd514c;" ng-if="data.userjoin"></span> {{data.seller.name}}</h5>
                            </div>
                            <div class="am-u-sm-3" style="text-align:right;">
                                <span class="am-badge am-badge-success am-radius am-text-sm">{{data.industry.industryName}}</span>
                            </div>
                        </div>
                        <div class="am-g">
                            <div class="am-u-sm-12">
                                <h6 class="am-list-item-text">{{data.content}}</h6>
                            </div>
                        </div>
                        <div class="am-g">
                            <div class="am-u-sm-4">
                                <h6 class="am-list-item-text" style="color: #9b9b9b;">{{data.createUid.name}}</h6>
                            </div>
                            <div class="am-u-sm-8" style="text-align:right;">
                                <h6 class="am-list-item-text" style="color: #9b9b9b;">{{formatDate(data.startTime, 'MM/dd hh:mm')}} - {{formatDate(data.finishTime, 'MM/dd hh:mm')}}</h6>
                            </div>
                        </div>
                    </a>
                </li>
            </ul>
        </li>

        <li class="am-panel">
            <a data-am-collapse="{target: '#teleConference-nav'}" style="background-color:#eee">
                &nbsp;电话会议 <i class="am-fr am-margin-right"> {{listData.teleConferenceResult.length}} </i>
            </a>
            <ul class="am-list am-collapse admin-sidebar-sub am-in" id="teleConference-nav">
                <li class="am-g am-list-item-desced" style="padding: 0px;" ng-repeat="data in listData.teleConferenceResult">
                    <a class="am-list-main" href="teleconference/detail?rowId={{data.rowId}}">
                        <div class="am-g">
                            <div class="am-u-sm-9">
                                <h5 class="am-list-item-hd" style="margin-bottom: 2px"><span class="am-icon-star" style="color: #dd514c;" ng-if="data.userjoin"></span> {{data.seller.name}}</h5>
                            </div>
                            <div class="am-u-sm-3" style="text-align:right;">
                                <span class="am-badge am-badge-success am-radius am-text-sm">{{data.industry.industryName}}</span>
                            </div>
                        </div>
                        <div class="am-g">
                            <div class="am-u-sm-12">
                                <h6 class="am-list-item-text">{{data.content}}</h6>
                            </div>
                        </div>
                        <div class="am-g">
                            <div class="am-u-sm-4">
                                <h6 class="am-list-item-text" style="color: #9b9b9b;">{{data.createUid.name}}</h6>
                            </div>
                            <div class="am-u-sm-8" style="text-align:right;">
                                <h6 class="am-list-item-text" style="color: #9b9b9b;">{{formatDate(data.startTime, 'MM/dd hh:mm')}} - {{formatDate(data.finishTime, 'MM/dd hh:mm')}}</h6>
                            </div>
                        </div>
                    </a>
                </li>
            </ul>
        </li>

        <li class="am-panel">
        <a data-am-collapse="{target: '#strategymeeting-nav'}" style="background-color:#eee">
            &nbsp;策略会 <i class="am-fr am-margin-right"> {{listData.strategymeetingResult.length}} </i>
        </a>
        <ul class="am-list am-collapse admin-sidebar-sub am-in" id="strategymeeting-nav">
            <li class="am-g am-list-item-desced" style="padding: 0px;" ng-repeat="data in listData.strategymeetingResult">
                <a class="am-list-main" href="strategy/detail?rowId={{data.rowId}}">
                    <div class="am-g">
                        <div class="am-u-sm-9">
                            <h5 class="am-list-item-hd" style="margin-bottom: 2px"><span class="am-icon-star" style="color: #dd514c;" ng-if="data.userjoin"></span> {{data.seller.name}}</h5>
                        </div>
                        <div class="am-u-sm-3" style="text-align:right;">
                            <span class="am-badge am-badge-success am-radius am-text-sm">{{data.industry.industryName}}</span>
                        </div>
                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-12">
                            <h6 class="am-list-item-text">{{data.content}}</h6>
                        </div>
                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-4">
                            <h6 class="am-list-item-text" style="color: #9b9b9b;">{{data.createUid.name}}</h6>
                        </div>
                        <div class="am-u-sm-8" style="text-align:right;">
                            <h6 class="am-list-item-text" style="color: #9b9b9b;">{{formatDate(data.startTime, 'MM/dd hh:mm')}} - {{formatDate(data.finishTime, 'MM/dd hh:mm')}}</h6>
                        </div>
                    </div>
                </a>
            </li>
        </ul>
        </li>

        <li class="am-panel">
        <a data-am-collapse="{target: '#workdiary-nav'}" style="background-color:#eee">
            &nbsp;其他 <i class="am-fr am-margin-right"> {{listData.workDiaryResult.length}} </i>
        </a>
        <ul class="am-list am-collapse admin-sidebar-sub am-in" id="workdiary-nav">
            <li class="am-g am-list-item-desced" style="padding: 0px;" ng-repeat="data in listData.workDiaryResult">
                <a class="am-list-main" href="workdiary/page?pageType=detail&rowId={{data.rowId}}">
                    <div class="am-g">
                        <div class="am-u-sm-12">
                            <h5 class="am-list-item-hd" style="margin-bottom: 2px"><span class="am-icon-star" style="color: #dd514c;" ng-if="data.title"></span> {{data.title}}</h5>
                        </div>
                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-12">
                            <h6 class="am-list-item-text">{{data.content}}</h6>
                        </div>
                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-4">
                            <h6 class="am-list-item-text" style="color: #9b9b9b;">{{data.createUid.name}}</h6>
                        </div>
                        <div class="am-u-sm-8" style="text-align:right;">
                            <h6 class="am-list-item-text" style="color: #9b9b9b;">{{formatDate(data.startTime, 'MM/dd hh:mm')}} - {{formatDate(data.finishTime, 'MM/dd hh:mm')}}</h6>
                        </div>
                    </div>
                </a>
            </li>
        </ul>
        </li>
    </ul>

</div>

<script src="/javascripts/app/schedule/schedule.js"></script>

<% include ../footer.ejs %>
